3.633 \(\int \log (c (d+\frac{e}{(f+g x)^2})^q) \, dx\)

Optimal. Leaf size=59 \[ \frac{(f+g x) \log \left (c \left (d+\frac{e}{(f+g x)^2}\right )^q\right )}{g}+\frac{2 \sqrt{e} q \tan ^{-1}\left (\frac{\sqrt{d} (f+g x)}{\sqrt{e}}\right )}{\sqrt{d} g} \]

[Out]

(2*Sqrt[e]*q*ArcTan[(Sqrt[d]*(f + g*x))/Sqrt[e]])/(Sqrt[d]*g) + ((f + g*x)*Log[c*(d + e/(f + g*x)^2)^q])/g

________________________________________________________________________________________

Rubi [A]  time = 0.0356361, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2483, 2448, 263, 205} \[ \frac{(f+g x) \log \left (c \left (d+\frac{e}{(f+g x)^2}\right )^q\right )}{g}+\frac{2 \sqrt{e} q \tan ^{-1}\left (\frac{\sqrt{d} (f+g x)}{\sqrt{e}}\right )}{\sqrt{d} g} \]

Antiderivative was successfully verified.

[In]

Int[Log[c*(d + e/(f + g*x)^2)^q],x]

[Out]

(2*Sqrt[e]*q*ArcTan[(Sqrt[d]*(f + g*x))/Sqrt[e]])/(Sqrt[d]*g) + ((f + g*x)*Log[c*(d + e/(f + g*x)^2)^q])/g

Rule 2483

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*((f_.) + (g_.)*(x_))^(n_))^(p_.)]*(b_.))^(q_.), x_Symbol] :> Dist[1/g, Su
bst[Int[(a + b*Log[c*(d + e*x^n)^p])^q, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IGtQ[q
, 0] && (EqQ[q, 1] || IntegerQ[n])

Rule 2448

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \log \left (c \left (d+\frac{e}{(f+g x)^2}\right )^q\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \log \left (c \left (d+\frac{e}{x^2}\right )^q\right ) \, dx,x,f+g x\right )}{g}\\ &=\frac{(f+g x) \log \left (c \left (d+\frac{e}{(f+g x)^2}\right )^q\right )}{g}+\frac{(2 e q) \operatorname{Subst}\left (\int \frac{1}{\left (d+\frac{e}{x^2}\right ) x^2} \, dx,x,f+g x\right )}{g}\\ &=\frac{(f+g x) \log \left (c \left (d+\frac{e}{(f+g x)^2}\right )^q\right )}{g}+\frac{(2 e q) \operatorname{Subst}\left (\int \frac{1}{e+d x^2} \, dx,x,f+g x\right )}{g}\\ &=\frac{2 \sqrt{e} q \tan ^{-1}\left (\frac{\sqrt{d} (f+g x)}{\sqrt{e}}\right )}{\sqrt{d} g}+\frac{(f+g x) \log \left (c \left (d+\frac{e}{(f+g x)^2}\right )^q\right )}{g}\\ \end{align*}

Mathematica [A]  time = 0.0468646, size = 61, normalized size = 1.03 \[ \frac{(f+g x) \log \left (c \left (d+\frac{e}{(f+g x)^2}\right )^q\right )}{g}-\frac{2 \sqrt{e} q \tan ^{-1}\left (\frac{\sqrt{e}}{\sqrt{d} (f+g x)}\right )}{\sqrt{d} g} \]

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(d + e/(f + g*x)^2)^q],x]

[Out]

(-2*Sqrt[e]*q*ArcTan[Sqrt[e]/(Sqrt[d]*(f + g*x))])/(Sqrt[d]*g) + ((f + g*x)*Log[c*(d + e/(f + g*x)^2)^q])/g

________________________________________________________________________________________

Maple [B]  time = 0.133, size = 115, normalized size = 2. \begin{align*} \ln \left ( c \left ({\frac{d{g}^{2}{x}^{2}+2\,dfgx+d{f}^{2}+e}{ \left ( gx+f \right ) ^{2}}} \right ) ^{q} \right ) x-2\,{\frac{qf\ln \left ( gx+f \right ) }{g}}+{\frac{qf\ln \left ( d{g}^{2}{x}^{2}+2\,dfgx+d{f}^{2}+e \right ) }{g}}+2\,{\frac{eq}{g\sqrt{de}}\arctan \left ( 1/2\,{\frac{2\,d{g}^{2}x+2\,dfg}{g\sqrt{de}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(d+e/(g*x+f)^2)^q),x)

[Out]

ln(c*((d*g^2*x^2+2*d*f*g*x+d*f^2+e)/(g*x+f)^2)^q)*x-2/g*q*f*ln(g*x+f)+1/g*q*f*ln(d*g^2*x^2+2*d*f*g*x+d*f^2+e)+
2/g*e*q/(d*e)^(1/2)*arctan(1/2*(2*d*g^2*x+2*d*f*g)/g/(d*e)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f)^2)^q),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.7431, size = 660, normalized size = 11.19 \begin{align*} \left [\frac{g q x \log \left (\frac{d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}{g^{2} x^{2} + 2 \, f g x + f^{2}}\right ) + f q \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - 2 \, f q \log \left (g x + f\right ) + g x \log \left (c\right ) + q \sqrt{-\frac{e}{d}} \log \left (\frac{d g^{2} x^{2} + 2 \, d f g x + d f^{2} + 2 \,{\left (d g x + d f\right )} \sqrt{-\frac{e}{d}} - e}{d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}\right )}{g}, \frac{g q x \log \left (\frac{d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}{g^{2} x^{2} + 2 \, f g x + f^{2}}\right ) + f q \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - 2 \, f q \log \left (g x + f\right ) + g x \log \left (c\right ) + 2 \, q \sqrt{\frac{e}{d}} \arctan \left (\frac{{\left (d g x + d f\right )} \sqrt{\frac{e}{d}}}{e}\right )}{g}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f)^2)^q),x, algorithm="fricas")

[Out]

[(g*q*x*log((d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)/(g^2*x^2 + 2*f*g*x + f^2)) + f*q*log(d*g^2*x^2 + 2*d*f*g*x + d
*f^2 + e) - 2*f*q*log(g*x + f) + g*x*log(c) + q*sqrt(-e/d)*log((d*g^2*x^2 + 2*d*f*g*x + d*f^2 + 2*(d*g*x + d*f
)*sqrt(-e/d) - e)/(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)))/g, (g*q*x*log((d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)/(g^2
*x^2 + 2*f*g*x + f^2)) + f*q*log(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e) - 2*f*q*log(g*x + f) + g*x*log(c) + 2*q*sq
rt(e/d)*arctan((d*g*x + d*f)*sqrt(e/d)/e))/g]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(d+e/(g*x+f)**2)**q),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 4.57269, size = 185, normalized size = 3.14 \begin{align*} d g^{4} q{\left (\frac{f e^{\left (-1\right )} \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right )}{d g^{5}} - \frac{2 \, f e^{\left (-1\right )} \log \left ({\left | g x + f \right |}\right )}{d g^{5}} + \frac{2 \, \arctan \left (\frac{{\left (d g x + d f\right )} e^{\left (-\frac{1}{2}\right )}}{\sqrt{d}}\right ) e^{\left (-\frac{1}{2}\right )}}{d^{\frac{3}{2}} g^{5}}\right )} e + q x \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - q x \log \left (g^{2} x^{2} + 2 \, f g x + f^{2}\right ) + x \log \left (c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f)^2)^q),x, algorithm="giac")

[Out]

d*g^4*q*(f*e^(-1)*log(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)/(d*g^5) - 2*f*e^(-1)*log(abs(g*x + f))/(d*g^5) + 2*ar
ctan((d*g*x + d*f)*e^(-1/2)/sqrt(d))*e^(-1/2)/(d^(3/2)*g^5))*e + q*x*log(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e) -
q*x*log(g^2*x^2 + 2*f*g*x + f^2) + x*log(c)